using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class LoadSelections : MonoBehaviour
{
    public Button Load1;
    public Button Load2;
    public Button Load3;
    public Button Load4;

    SaveMenuOther saveMenu;
    private void Awake()
    {
        saveMenu = GetComponentInParent<SaveMenuOther>();
    }

    // Start is called before the first frame update
    void Start()
    {
        Load1.onClick.AddListener(() =>
        {
            GameManager.Instance.LoadData(1);
            saveMenu.CloseSaveMenu();
        });
        Load2.onClick.AddListener(() =>
        {
            GameManager.Instance.LoadData(2);
            saveMenu.CloseSaveMenu();
        });
        Load3.onClick.AddListener(() =>
        {
            GameManager.Instance.LoadData(3);
            saveMenu.CloseSaveMenu();
        });
        Load4.onClick.AddListener(() =>
        {
            GameManager.Instance.LoadData(4);
            saveMenu.CloseSaveMenu();
        });
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
